<template>
  <div class="block">
    <el-date-picker
      v-model="value"
      align="right"
      type="date"
      placeholder="选择日期"
      @change='change'
      value-format="yyyy年M月d日"
      :picker-options="pickerOptions">
    </el-date-picker>
  </div>
</template>

<script>
export default {
  data() {
    return {
      pickerOptions: {
        disabledDate(time) {
          return time.getTime()+3600 * 1000 * 24 <= Date.now();
        }
      },
      value: ''
    };
  },
  methods:{
    change(value){
      this.$emit('getDate',value)     
    }
  }
};
</script>

<style scoped>
.block{
    width: 210px;
}
.block div{
    width:186px;
}
</style>